package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.text.TextUtils;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.ScoreModel;

public class InvitationAdapter extends BaseQuickImageAdapter<ScoreModel> {

    private String mType;

    public InvitationAdapter(Context context, String type) {
        super(context, R.layout.item_invitation);
        this.mType = type;
    }

    @Override
    protected void convert(BaseViewHolder helper, ScoreModel item) {

        helper.setText(R.id.tv_name, item.getNickName())
                .setText(R.id.tv_time, item.getSignUpTime());
        if (!TextUtils.isEmpty(item.getAvatarUrl())) {
            mLoadImgCtrl.getGlide().load(item.getAvatarUrl()).into((ImageView) helper.getView(R.id.iv_head));
        }
    }

    public void setType(String type) {
        this.mType = type;
    }
}
